package top.dashuizhuyu.study.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import top.dashuizhuyu.study.entity.User;

/**
 * <p>
 *
 * @author dashuizhuyu@foxmail.com
 * @date 2020/1/22 11:15
 **/
@Repository
public interface UserDao extends JpaRepository<User,Long>, JpaSpecificationExecutor<User> {

    @Query(value = "select User from username =: username ",nativeQuery = true)
    User findByUserName(String username);






}
